#!/bin/bash -x

publicIP=$(curl -H "Metadata: true" "http://169.254.169.254/metadata/instance/network/interface/0/ipv4/ipAddress/0/publicIpAddress?api-version=2019-06-01&format=text")
privateIP=$(curl -H "Metadata: true" "http://169.254.169.254/metadata/instance/network/interface/0/ipv4/ipAddress/0/privateIpAddress?api-version=2019-06-01&format=text")

${register_command} --address $publicIP --internal-address $privateIP --etcd --controlplane --worker
